package com.zf.yichat.model;

import com.fasterxml.jackson.annotation.JsonFormat;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.*;

@Table(name = "st_official_ticket")
public class StOfficialTicket implements Serializable {
    @Id
    private Integer id;

    /**
     * 门票唯一码
     */
    @Column(name = "ticket_code")
    private String ticketCode;

    /**
     * 二维码地址
     */
    @Column(name = "qr_code_address")
    private String qrCodeAddress;

    /**
     * 已扫码次数
     */
    @Column(name = "scan_count")
    private Integer scanCount;

    /**
     * 有效天数
     */
    @Column(name = "valid_days")
    private Integer validDays;

    private Integer status;

    /**
     * 开始日期
     */
    @Column(name = "start_date")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date startDate;

    @Column(name = "create_time")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    private static final long serialVersionUID = 1L;

    public StOfficialTicket(Integer id, String ticketCode, String qrCodeAddress, Integer scanCount, Integer validDays, Integer status, Date startDate, Date createTime) {
        this.id = id;
        this.ticketCode = ticketCode;
        this.qrCodeAddress = qrCodeAddress;
        this.scanCount = scanCount;
        this.validDays = validDays;
        this.status = status;
        this.startDate = startDate;
        this.createTime = createTime;
    }

    public StOfficialTicket() {
        super();
    }

    /**
     * @return id
     */
    public Integer getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Integer id) {
        this.id = id;
    }

    /**
     * 获取门票唯一码
     *
     * @return ticket_code - 门票唯一码
     */
    public String getTicketCode() {
        return ticketCode;
    }

    /**
     * 设置门票唯一码
     *
     * @param ticketCode 门票唯一码
     */
    public void setTicketCode(String ticketCode) {
        this.ticketCode = ticketCode == null ? null : ticketCode.trim();
    }

    /**
     * 获取二维码地址
     *
     * @return qr_code_address - 二维码地址
     */
    public String getQrCodeAddress() {
        return qrCodeAddress;
    }

    /**
     * 设置二维码地址
     *
     * @param qrCodeAddress 二维码地址
     */
    public void setQrCodeAddress(String qrCodeAddress) {
        this.qrCodeAddress = qrCodeAddress == null ? null : qrCodeAddress.trim();
    }

    /**
     * 获取已扫码次数
     *
     * @return scan_count - 已扫码次数
     */
    public Integer getScanCount() {
        return scanCount;
    }

    /**
     * 设置已扫码次数
     *
     * @param scanCount 已扫码次数
     */
    public void setScanCount(Integer scanCount) {
        this.scanCount = scanCount;
    }

    /**
     * 获取有效天数
     *
     * @return valid_days - 有效天数
     */
    public Integer getValidDays() {
        return validDays;
    }

    /**
     * 设置有效天数
     *
     * @param validDays 有效天数
     */
    public void setValidDays(Integer validDays) {
        this.validDays = validDays;
    }

    /**
     * @return status
     */
    public Integer getStatus() {
        return status;
    }

    /**
     * @param status
     */
    public void setStatus(Integer status) {
        this.status = status;
    }

    /**
     * 获取开始日期
     *
     * @return start_date - 开始日期
     */
    public Date getStartDate() {
        return startDate;
    }

    /**
     * 设置开始日期
     *
     * @param startDate 开始日期
     */
    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    /**
     * @return create_time
     */
    public Date getCreateTime() {
        return createTime;
    }

    /**
     * @param createTime
     */
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}